package comone.javaone;

import java.util.Scanner;

public class Master {

    public void  masterSwitch(){

    }

    public Touirst addScanner(){
        Touirst touirst = new Touirst();
        Scanner scanner = new Scanner(System.in);
        System.out.print("请输入姓名");
        touirst.name = scanner.next();
        System.out.print("请输入年龄");
        touirst.age = scanner.nextInt();

        return touirst;
    }

    public User addUser(Scanner scanner ){
        User user = new User();
        System.out.print("请输入姓名");
        user.name = scanner.next();
        System.out.print("请输入密码");
        user.password = scanner.next();;
        return user;
    }
}
